import request from '@/utils/request'

//修改关联
export function deleteCityDisplays(id, data) {
  return request({
    url: "/cms/city/" + id + "/displays",
    method: "delete",
    data: data
  })
}

//修改关联
export function editCityDisplays(data) {
  return request({
    url: "/cms/city/displays",
    method: "put",
    data: data
  })
}

//添加关联
export function addCityDisplays(data) {
  return request({
    url: "/cms/city/displays",
    method: "post",
    data: data
  })
}

//展示屏列表
export function getAllDisplays(id) {
  return request({
    url: "/cms/city/" + id + "/displays",
    method: "get"
  })
}

//关联展示屏
export function listDisplay(id) {
  return request({
    url: "/cms/city/"+ id + "/display",
    method: "get"
  })
}

// 查询城市管理列表
export function listCity(query) {
  return request({
    url: '/cms/city/list',
    method: 'get',
    params: query
  })
}

// 查询城市管理详细
export function getCity(id) {
  return request({
    url: '/cms/city/' + id,
    method: 'get'
  })
}

// 新增城市管理
export function addCity(data) {
  return request({
    url: '/cms/city',
    method: 'post',
    data: data
  })
}

// 修改城市管理
export function updateCity(data) {
  return request({
    url: '/cms/city',
    method: 'put',
    data: data
  })
}

// 删除城市管理
export function delCity(id) {
  return request({
    url: '/cms/city/' + id,
    method: 'delete'
  })
}

// 导出城市管理
export function exportCity(query) {
  return request({
    url: '/cms/city/export',
    method: 'get',
    params: query
  })
}